A flow-based software virtual switch operating on a host machine will typically receive flow entries (e.g., OpenFlow flow entries) from a centralized network controller. These flow entries may relate to numerous logical networks implemented by the physical network of which the software virtual switch is a part. This requires the network controller to calculate the flow entries for a multitude of such flow-based switches, which can scale quickly as the number and size of the logical networks grows. As such, more efficient mechanisms for calculating these flow entries and handling logical networks within a datacenter or group of datacenters are required.